import 'package:flutter/material.dart';
import 'package:flutter_reader/model/novel.dart';
import 'package:flutter_reader/ui/novel_detail/novel_detail_page.dart';
import 'package:flutter_reader/ui/reader/reader_page.dart';

class AppNavigator {
  static void push(BuildContext context, Widget page) {
    Navigator.push(context, MaterialPageRoute(builder: (context) => page));
  }

  static pushNovelDetail(BuildContext context, Novel novel) {
    AppNavigator.push(context, NovelDetailPage(novel));
  }

  static pushReader(BuildContext context, int articleId) {
    AppNavigator.push(context, ReaderPage(articleId: articleId));
  }
}
